-- GENERATED SPELL FOR [Nexus Terror] --


function spell0_19307(pUnit, Event) --@Curse of Impotence,n/a--
pUnit:FullCastSpellOnTarget(34925,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19307', 609, 1)
end

function spell1_19307(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(38065,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19307', 3278, 1)
end

function spell2_19307(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(34322,pUnit)
pUnit:RegisterEvent('Sorts_19307', 4312, 1)
end

function Sorts_19307(pUnit, Event)
local choix_sorts_19307 = math.random(0, 2)
if choix_sorts_19307 == 0 then
pUnit:RegisterEvent('spell0_19307', 1, 1)
end
if choix_sorts_19307 == 1 then
pUnit:RegisterEvent('spell1_19307', 1, 1)
end
if choix_sorts_19307 == 2 then
pUnit:RegisterEvent('spell2_19307', 1, 1)
end
end

function mob19307_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19307', math.random(1500, 3000), 1)
end

function mob19307_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19307_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19307_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19307, 1, 'mob19307_Action')
RegisterUnitEvent(19307, 2, 'mob19307_Leave')
RegisterUnitEvent(19307, 3, 'mob19307_Kill')
RegisterUnitEvent(19307, 4, 'mob19307_Die')
